package com.itcoon.cloud.framework.enums;

import org.springframework.http.HttpStatus;

public enum CommonResponseCode {

    OK("OK", "成功", HttpStatus.OK),

    SYSTEM_EXCEPTION("System Exception", "系统错误, 请联系管理员", HttpStatus.INTERNAL_SERVER_ERROR),

    NOT_FOUND("NOT FOUND", "访问资源不存在", HttpStatus.NOT_FOUND),

    ACCESS_FREQUENTLY("ACCESS FREQUENTLY", "访问太频繁，请稍后再试", HttpStatus.FORBIDDEN)
    ;

    private final String code;
    private final String message;

    private final HttpStatus status;

    CommonResponseCode(String code, String message, HttpStatus status) {
        this.code = code;
        this.message = message;
        this.status = status;
    }

    public String getCode() {
        return this.code;
    }

    public String getMessage() {
        return this.message;
    }

    public HttpStatus getStatus() {
        return status;
    }
}
